﻿﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace alphabook
{
    static class Util
    {
        /// <summary>
        /// Little SQL result checker
        /// </summary>
        /// <param name="r"></param>
        /// <returns>0 on success</returns>
        public static int checkResult(int r)
        {
            if (r != 0)
            {
                return 0;
            }
            return 1;
        }

        public static String toMySQLDate(DateTime d)
        {
            return d.ToString("yyyy-MM-dd");
        }
    }
}